// 家庭成员管理相关的类型定义

// 家庭成员角色
export type FamilyRole = "admin" | "member" | "child" | "guest";

// 家庭关系
export type FamilyRelationship =
  | "father"
  | "mother"
  | "son"
  | "daughter"
  | "grandfather"
  | "grandmother"
  | "other";

// 家庭成员响应
export interface FamilyMemberResponse {
  username: string;
  email: string;
  full_name: string;
  id: number;
  is_active: boolean;
  nickname?: string | null;
  role: FamilyRole;
  relationship?: FamilyRelationship | null;
  family_id: number;
  phone?: string | null;
  avatar?: string | null;
  birth_date?: string | null;
  gender?: string | null;
  created_at: string;
  family_name?: string | null;
}

// 家庭成员创建
export interface FamilyMemberCreate {
  username: string;
  email: string;
  full_name: string;
  password: string;
  role?: FamilyRole | null;
  relationship?: FamilyRelationship | null;
  phone?: string | null;
  birth_date?: string | null;
  gender?: string | null;
  nickname?: string | null;
}

// 家庭成员更新
export interface FamilyMemberUpdate {
  username?: string | null;
  email?: string | null;
  full_name?: string | null;
  nickname?: string | null;
  role?: FamilyRole | null;
  relationship?: FamilyRelationship | null;
  family_id?: string | null;
  phone?: string | null;
  avatar?: string | null;
  birth_date?: string | null;
  gender?: string | null;
  is_active?: boolean | null;
}

// 家庭成员列表查询参数
export interface FamilyMemberListParams {
  skip?: number;
  limit?: number;
  role?: FamilyRole | null;
}

// 管理员检查响应
export interface AdminCheckResponse {
  is_admin: boolean;
}
